<template>
  <div class="swiper" :style="swiperTop == true?'margin-top:89.96px;':'margin-top:0;'">
    <swiper :options="swiperOption" class="page-swiper" ref="mySwiper">
      <!-- slides -->
      <swiper-slide v-for="item of swiperlist" :key="item.id"><img :src="item.url" alt=""></swiper-slide>
      <!-- Optional controls -->
      <div class="swiper-pagination"  slot="pagination"></div>
    </swiper>
  </div>
</template>

<script>
export default {
  name: 'Slider',
  data () {
    return {
      swiperOption: {
        autoplay: true,
        pagination: '.swiper-pagination',
        loop: true
      }
    }
  },
  props: {
    swiperlist: Array,
    swiperTop: Boolean
  }
}
</script>

<style lang="stylus" scoped>
  img
    width 100%
</style>
